package com.sc.nft.dao;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sc.nft.entity.MallUserPropsRewards;
import com.sc.nft.entity.vo.UserPropsRewardsSummaryVO;
import com.sc.nft.mapper.MallUserPropsRewardsMapper;
import lombok.extern.slf4j.Slf4j;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

@Slf4j
@Repository
public class MallUserPropsRewardsDao extends ServiceImpl<MallUserPropsRewardsMapper, MallUserPropsRewards> {


    /**
     * 查询用户道具奖励汇总数据
     */
    public UserPropsRewardsSummaryVO getSummary(@Param("startTime") Date startTime,
                                                @Param("endTime") Date endTime,
                                                @Param("userId") Long userId,
                                                @Param("propsIds") List<Long> propsIds) {
        return baseMapper.getSummary(startTime, endTime, userId, propsIds);
    }


    public List<MallUserPropsRewards> selectByLastMinId(Long lastMinId, Integer pageSize, Date startTime) {
        return baseMapper.selectByLastMinId(lastMinId, pageSize, startTime);
    }

}
